public class Test {
    public static void main(String[] args) {
        int[] nums = {1,0,2,3,0};
        moveZeroes(nums);
        for(int x : nums){
            System.out.print(x+" ");
        }
    }
    public static void moveZeroes(int[] nums) {
        if(nums.length == 0){
            System.out.println("null");
        }
        if(nums.length == 1){
            System.out.println(nums[0]);
        }
        int j = 0;
        int tmp = 0;
        for(int i=0;i < nums.length;i++){
            if(nums[i] != 0){
                tmp = nums[i];
                nums[i] = nums[j];
                nums[j++] = tmp;
            }
        }
    }
}
